<nav class="navbar navbar-expand-lg navbar-dark bg-dark shadow">
    <a class="navbar-brand ml-5 mr-2" href="#"><h3>BangBangBa</h3></a>
    <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
        <span class="navbar-toggler-icon"></span>
    </button>

    <div class="collapse navbar-collapse justify-content-end" id="navbarSupportedContent">


        <ul class="navbar-nav mr-5 justify-content-end">
            @if(!$auth)
                <li class="nav-item ">
                    <a class="nav-link" href="{{ route('login') }}">登入</a>
                </li>
            @else
                <ul class="navbar-nav mr-auto text-white">
                    <li class="nav-item">
                        <a class="nav-link {{ request()->getPathInfo() == substr(url('managers/manage/0'),16) ? 'active' : ''}}"
                           href="{{ url('/managers/manage/0') }}">订单管理</a>
                    </li>
                    <li class="nav-item}">
                        <a class="nav-link {{ request()->getPathInfo() == substr(url('managers/manage/1'),16) ? 'active' : ''}}"
                           href="{{ url('/managers/manage/1') }}">用户管理</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link active" href="{{ route('logout') }}">退出登入</a>
                    </li>
                </ul>

                <li class="nav-item py-2 ml-2">
                    <p class="text-white mb-0">欢迎回来 {{ $auth->name }}</p>
                </li>
            @endif
        </ul>
    </div>
</nav>

